package com.group3.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@ToString
@ApiModel(value = "请假详情")
public class Leave {

    @ApiModelProperty(value = "请假id")
    private Integer leaveId;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "请假开始时间")
    private Date startLeaveTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "请假结束时间")
    private Date endLeaveTime;

    @ApiModelProperty(value = "审批状态")
    private Integer state;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @ApiModelProperty(value = "提交时间")
    private Date submitTime;

    @NotEmpty
    @ApiModelProperty(value = "学生id")
    private String studentId;

    @ApiModelProperty(value = "请假类型")
    private Integer type;

    @ApiModelProperty(value = "请假主题")
    private String theme;

    @ApiModelProperty(value = "请假原因")
    private String reason;

    public Integer getLeaveId() {
        return leaveId;
    }

    public void setLeaveId(Integer leaveId) {
        this.leaveId = leaveId;
    }

    public Date getStartLeaveTime() {
        return startLeaveTime;
    }

    public void setStartLeaveTime(Date startLeaveTime) {
        this.startLeaveTime = startLeaveTime;
    }

    public Date getEndLeaveTime() {
        return endLeaveTime;
    }

    public void setEndLeaveTime(Date endLeaveTime) {
        this.endLeaveTime = endLeaveTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Date getSubmitTime() {
        return submitTime;
    }

    public void setSubmitTime(Date submitTime) {
        this.submitTime = submitTime;
    }

    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId == null ? null : studentId.trim();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme == null ? null : theme.trim();
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason == null ? null : reason.trim();
    }
}